# for i in range(10):
    # print("hello")
s=eval(input("请输入阶乘的数："))

for i in range (1,s):
    print(i)
    s=s*i
print(s)
# s=1
# n=eval(input("请输入一个整数"))
# for i in range (1,1+n):
# s=s*i
# print(s)